<!DOCTYPE html>

<html lang="en" data-content_root="../">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

  <title>CMake 3.18 Release Notes &mdash; CMake 4.1.1 Documentation</title>

    <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a2c47e09" />
    <link rel="stylesheet" type="text/css" href="../_static/cmake.css?v=4d06bd55" />
    
    <script src="../_static/documentation_options.js?v=e6a937a4"></script>
    <script src="../_static/doctools.js?v=9bcbadda"></script>
    <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
    
    <link rel="icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMake 3.17 Release Notes" href="3.17.html" />
    <link rel="prev" title="CMake 3.19 Release Notes" href="3.19.html" />
 

  </head><body>
    <input id="sidebar-check" type="checkbox" />
    <label id="sidebar-overlay" for="sidebar-check"></label>



    <div class="related relbar1" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="3.17.html" title="CMake 3.17 Release Notes"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="3.19.html" title="CMake 3.19 Release Notes"
             accesskey="P">previous</a> |</li>
  <li>
    <label class="sidebar-toggle" for="sidebar-check"></label>
  </li>
  <li class="rootlink">
    <img src="../_static/cmake-logo-16.png" width="16" height="16" alt=""/>
    <a href="https://cmake.org/">CMake 4.1.1</a>
    <span class="reldelim1"> &#187;</span>
  </li>
  <li>
    <a href="../index.html">Documentation</a> &#187;
  </li>

          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">CMake Release Notes</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">CMake 3.18 Release Notes</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="cmake-3-18-release-notes">
<h1><a class="toc-backref" href="#id4" role="doc-backlink">CMake 3.18 Release Notes</a><a class="headerlink" href="#cmake-3-18-release-notes" title="Link to this heading">¶</a></h1>
<nav class="contents" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#cmake-3-18-release-notes" id="id4">CMake 3.18 Release Notes</a></p>
<ul>
<li><p><a class="reference internal" href="#new-features" id="id5">New Features</a></p>
<ul>
<li><p><a class="reference internal" href="#languages" id="id6">Languages</a></p></li>
<li><p><a class="reference internal" href="#command-line" id="id7">Command-Line</a></p></li>
<li><p><a class="reference internal" href="#commands" id="id8">Commands</a></p></li>
<li><p><a class="reference internal" href="#variables" id="id9">Variables</a></p></li>
<li><p><a class="reference internal" href="#properties" id="id10">Properties</a></p></li>
<li><p><a class="reference internal" href="#modules" id="id11">Modules</a></p></li>
<li><p><a class="reference internal" href="#generator-expressions" id="id12">Generator Expressions</a></p></li>
<li><p><a class="reference internal" href="#ctest" id="id13">CTest</a></p></li>
<li><p><a class="reference internal" href="#cpack" id="id14">CPack</a></p></li>
<li><p><a class="reference internal" href="#other" id="id15">Other</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#deprecated-and-removed-features" id="id16">Deprecated and Removed Features</a></p></li>
<li><p><a class="reference internal" href="#other-changes" id="id17">Other Changes</a></p></li>
<li><p><a class="reference internal" href="#updates" id="id18">Updates</a></p>
<ul>
<li><p><a class="reference internal" href="#id1" id="id19">3.18.1</a></p></li>
<li><p><a class="reference internal" href="#id2" id="id20">3.18.2</a></p></li>
<li><p><a class="reference internal" href="#id3" id="id21">3.18.3</a></p></li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
<p>Changes made since CMake 3.17 include the following.</p>
<section id="new-features">
<h2><a class="toc-backref" href="#id5" role="doc-backlink">New Features</a><a class="headerlink" href="#new-features" title="Link to this heading">¶</a></h2>
<section id="languages">
<h3><a class="toc-backref" href="#id6" role="doc-backlink">Languages</a><a class="headerlink" href="#languages" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p>The <code class="docutils literal notranslate"><span class="pre">CUDA</span></code> language can now be compiled using Clang on non-Windows
platforms. Separable compilation is not yet supported on any platform.</p></li>
</ul>
</section>
<section id="command-line">
<h3><a class="toc-backref" href="#id7" role="doc-backlink">Command-Line</a><a class="headerlink" href="#command-line" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="target" id="index-0-manual:cmake(1)"></span><a class="reference internal" href="../manual/cmake.1.html#manual:cmake(1)" title="cmake(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake(1)</span></code></a> gained support for profiling of CMake scripts through
the parameters <code class="docutils literal notranslate"><span class="pre">--profiling-output</span></code> and <code class="docutils literal notranslate"><span class="pre">--profiling-format</span></code>.</p></li>
<li><p><span class="target" id="index-1-manual:cmake(1)"></span><a class="reference internal" href="../manual/cmake.1.html#manual:cmake(1)" title="cmake(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake(1)</span></code></a> gained a <code class="docutils literal notranslate"><span class="pre">cat</span></code> command line
option that can be used to concatenate files and print them
on standard output.</p></li>
</ul>
</section>
<section id="commands">
<h3><a class="toc-backref" href="#id8" role="doc-backlink">Commands</a><a class="headerlink" href="#commands" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p>The <span class="target" id="index-0-command:add_library"></span><a class="reference internal" href="../command/add_library.html#command:add_library" title="add_library"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_library()</span></code></a> and <span class="target" id="index-0-command:add_executable"></span><a class="reference internal" href="../command/add_executable.html#command:add_executable" title="add_executable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_executable()</span></code></a> commands
learned to create <a class="reference internal" href="../manual/cmake-buildsystem.7.html#alias-targets"><span class="std std-ref">Alias Targets</span></a> referencing non-<code class="docutils literal notranslate"><span class="pre">GLOBAL</span></code>
<a class="reference internal" href="../manual/cmake-buildsystem.7.html#imported-targets"><span class="std std-ref">Imported Targets</span></a>.</p></li>
<li><p>The <span class="target" id="index-0-command:cmake_language"></span><a class="reference internal" href="../command/cmake_language.html#command:cmake_language" title="cmake_language"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">cmake_language()</span></code></a> command was added for meta-operations on
scripted or built-in commands, starting with a mode to <code class="docutils literal notranslate"><span class="pre">CALL</span></code> other
commands, and <code class="docutils literal notranslate"><span class="pre">EVAL</span> <span class="pre">CODE</span></code> to inplace evaluate a CMake script.</p></li>
<li><p>The <span class="target" id="index-0-command:execute_process"></span><a class="reference internal" href="../command/execute_process.html#command:execute_process" title="execute_process"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">execute_process()</span></code></a> command gained the <code class="docutils literal notranslate"><span class="pre">ECHO_OUTPUT_VARIABLE</span></code>
and <code class="docutils literal notranslate"><span class="pre">ECHO_ERROR_VARIABLE</span></code> options.</p></li>
<li><p>The <span class="target" id="index-0-command:export"></span><a class="reference internal" href="../command/export.html#command:export" title="export"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">export()</span></code></a> command now raise an error if used multiple times with
same <code class="docutils literal notranslate"><span class="pre">FILE</span></code> without <code class="docutils literal notranslate"><span class="pre">APPEND</span></code>. See policy <span class="target" id="index-0-policy:CMP0103"></span><a class="reference internal" href="../policy/CMP0103.html#policy:CMP0103" title="CMP0103"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0103</span></code></a>.</p></li>
<li><p>The <span class="target" id="index-0-command:file"></span><a class="reference internal" href="../command/file.html#command:file" title="file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">file()</span></code></a> command gained the <code class="docutils literal notranslate"><span class="pre">ARCHIVE_CREATE</span></code> and
<code class="docutils literal notranslate"><span class="pre">ARCHIVE_EXTRACT</span></code> subcommands to expose the <span class="target" id="index-2-manual:cmake(1)"></span><a class="reference internal" href="../manual/cmake.1.html#manual:cmake(1)" title="cmake(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake(1)</span></code></a> <code class="docutils literal notranslate"><span class="pre">-E</span> <span class="pre">tar</span></code>
functionality to CMake scripting code.</p></li>
<li><p>The <span class="target" id="index-1-command:file"></span><a class="reference internal" href="../command/file.html#configure" title="file(configure)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">file(CONFIGURE)</span></code></a> subcommand was created in order to replicate
the <span class="target" id="index-0-command:configure_file"></span><a class="reference internal" href="../command/configure_file.html#command:configure_file" title="configure_file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">configure_file()</span></code></a> functionality without resorting to a
pre-existing file on disk as input. The content is instead passed as a
string.</p></li>
<li><p>The <span class="target" id="index-2-command:file"></span><a class="reference internal" href="../command/file.html#upload" title="file(upload)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">file(UPLOAD)</span></code></a> command gained <code class="docutils literal notranslate"><span class="pre">TLS_VERIFY</span></code> and <code class="docutils literal notranslate"><span class="pre">TLS_CAINFO</span></code>
options to control server certificate verification.</p></li>
<li><p>The <span class="target" id="index-0-command:find_program"></span><a class="reference internal" href="../command/find_program.html#command:find_program" title="find_program"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_program()</span></code></a>, <span class="target" id="index-0-command:find_library"></span><a class="reference internal" href="../command/find_library.html#command:find_library" title="find_library"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_library()</span></code></a>, <span class="target" id="index-0-command:find_path"></span><a class="reference internal" href="../command/find_path.html#command:find_path" title="find_path"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_path()</span></code></a>
and <span class="target" id="index-0-command:find_file"></span><a class="reference internal" href="../command/find_file.html#command:find_file" title="find_file"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">find_file()</span></code></a> commands gained a new <code class="docutils literal notranslate"><span class="pre">REQUIRED</span></code> option that will
stop processing with an error message if nothing is found.</p></li>
<li><p>The <span class="target" id="index-0-command:get_property"></span><a class="reference internal" href="../command/get_property.html#command:get_property" title="get_property"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">get_property()</span></code></a> command with <code class="docutils literal notranslate"><span class="pre">SOURCE</span></code> scope gained the
<code class="docutils literal notranslate"><span class="pre">DIRECTORY</span></code> and <code class="docutils literal notranslate"><span class="pre">TARGET_DIRECTORY</span></code> options to get a property
from the provided directory scope.</p></li>
<li><p>The <span class="target" id="index-0-command:get_source_file_property"></span><a class="reference internal" href="../command/get_source_file_property.html#command:get_source_file_property" title="get_source_file_property"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">get_source_file_property()</span></code></a> command gained the <code class="docutils literal notranslate"><span class="pre">DIRECTORY</span></code>
and <code class="docutils literal notranslate"><span class="pre">TARGET_DIRECTORY</span></code> options to get a property from the
provided directory scope.</p></li>
<li><p>The <span class="target" id="index-0-command:list"></span><a class="reference internal" href="../command/list.html#command:list" title="list"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">list()</span></code></a> operation <code class="docutils literal notranslate"><span class="pre">SORT</span></code> gained the <code class="docutils literal notranslate"><span class="pre">NATURAL</span></code> sort
option to sort using natural order (see <code class="docutils literal notranslate"><span class="pre">strverscmp(3)</span></code> manual).</p></li>
<li><p>The <span class="target" id="index-0-command:set_property"></span><a class="reference internal" href="../command/set_property.html#command:set_property" title="set_property"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set_property()</span></code></a> command with the <code class="docutils literal notranslate"><span class="pre">SOURCE</span></code> scope gained the
<code class="docutils literal notranslate"><span class="pre">DIRECTORY</span></code> and <code class="docutils literal notranslate"><span class="pre">TARGET_DIRECTORY</span></code> options to set properties
in the provided directory scopes.</p></li>
<li><p>The <span class="target" id="index-0-command:set_source_files_properties"></span><a class="reference internal" href="../command/set_source_files_properties.html#command:set_source_files_properties" title="set_source_files_properties"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">set_source_files_properties()</span></code></a> command gained the <code class="docutils literal notranslate"><span class="pre">DIRECTORY</span></code>
and <code class="docutils literal notranslate"><span class="pre">TARGET_DIRECTORY</span></code> options to set properties in the provided
directory scopes.</p></li>
<li><p>The <span class="target" id="index-0-command:string"></span><a class="reference internal" href="../command/string.html#command:string" title="string"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">string()</span></code></a> command learned a new <code class="docutils literal notranslate"><span class="pre">HEX</span></code> sub-command, which
converts strings into their hexadecimal representation.</p></li>
</ul>
</section>
<section id="variables">
<h3><a class="toc-backref" href="#id9" role="doc-backlink">Variables</a><a class="headerlink" href="#variables" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p>A <span class="target" id="index-0-variable:CMAKE_CUDA_ARCHITECTURES"></span><a class="reference internal" href="../variable/CMAKE_CUDA_ARCHITECTURES.html#variable:CMAKE_CUDA_ARCHITECTURES" title="CMAKE_CUDA_ARCHITECTURES"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CUDA_ARCHITECTURES</span></code></a> variable was added to specify
CUDA output architectures.  Users are encouraged to use this instead of
specifying options manually, as this approach is compiler-agnostic.
The variable is initialized automatically when
<span class="target" id="index-0-variable:CMAKE_&lt;LANG&gt;_COMPILER_ID"></span><a class="reference internal" href="../variable/CMAKE_LANG_COMPILER_ID.html#variable:CMAKE_&lt;LANG&gt;_COMPILER_ID" title="CMAKE_&lt;LANG&gt;_COMPILER_ID"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CUDA_COMPILER_ID</span></code></a> is <code class="docutils literal notranslate"><span class="pre">NVIDIA</span></code>.
The variable is used to initialize the new <span class="target" id="index-0-prop_tgt:CUDA_ARCHITECTURES"></span><a class="reference internal" href="../prop_tgt/CUDA_ARCHITECTURES.html#prop_tgt:CUDA_ARCHITECTURES" title="CUDA_ARCHITECTURES"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">CUDA_ARCHITECTURES</span></code></a>
target property.  See policy <span class="target" id="index-0-policy:CMP0104"></span><a class="reference internal" href="../policy/CMP0104.html#policy:CMP0104" title="CMP0104"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0104</span></code></a>.</p></li>
<li><p>The <span class="target" id="index-0-variable:CMAKE_PCH_WARN_INVALID"></span><a class="reference internal" href="../variable/CMAKE_PCH_WARN_INVALID.html#variable:CMAKE_PCH_WARN_INVALID" title="CMAKE_PCH_WARN_INVALID"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_PCH_WARN_INVALID</span></code></a> variable was added to initialize the
<span class="target" id="index-0-prop_tgt:PCH_WARN_INVALID"></span><a class="reference internal" href="../prop_tgt/PCH_WARN_INVALID.html#prop_tgt:PCH_WARN_INVALID" title="PCH_WARN_INVALID"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">PCH_WARN_INVALID</span></code></a> target property to allow the removal of the
precompiled header invalid warning.</p></li>
</ul>
</section>
<section id="properties">
<h3><a class="toc-backref" href="#id10" role="doc-backlink">Properties</a><a class="headerlink" href="#properties" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p>The <span class="target" id="index-1-prop_tgt:CUDA_ARCHITECTURES"></span><a class="reference internal" href="../prop_tgt/CUDA_ARCHITECTURES.html#prop_tgt:CUDA_ARCHITECTURES" title="CUDA_ARCHITECTURES"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">CUDA_ARCHITECTURES</span></code></a> target property was added to specify
CUDA output architectures. Users are encouraged to use this instead of
specifying options manually, as this approach is compiler-agnostic.
The property is initialized by the new <span class="target" id="index-1-variable:CMAKE_CUDA_ARCHITECTURES"></span><a class="reference internal" href="../variable/CMAKE_CUDA_ARCHITECTURES.html#variable:CMAKE_CUDA_ARCHITECTURES" title="CMAKE_CUDA_ARCHITECTURES"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_CUDA_ARCHITECTURES</span></code></a>
variable.  See policy <span class="target" id="index-1-policy:CMP0104"></span><a class="reference internal" href="../policy/CMP0104.html#policy:CMP0104" title="CMP0104"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0104</span></code></a>.</p></li>
<li><p>The <span class="target" id="index-0-prop_tgt:Fortran_PREPROCESS"></span><a class="reference internal" href="../prop_tgt/Fortran_PREPROCESS.html#prop_tgt:Fortran_PREPROCESS" title="Fortran_PREPROCESS"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">Fortran_PREPROCESS</span></code></a> target property and
<span class="target" id="index-0-prop_sf:Fortran_PREPROCESS"></span><a class="reference internal" href="../prop_sf/Fortran_PREPROCESS.html#prop_sf:Fortran_PREPROCESS" title="Fortran_PREPROCESS"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">Fortran_PREPROCESS</span></code></a> source-file property were added to
control preprocessing of Fortran source files.</p></li>
<li><p>The <span class="target" id="index-0-prop_tgt:FRAMEWORK_MULTI_CONFIG_POSTFIX_&lt;CONFIG&gt;"></span><a class="reference internal" href="../prop_tgt/FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG.html#prop_tgt:FRAMEWORK_MULTI_CONFIG_POSTFIX_&lt;CONFIG&gt;" title="FRAMEWORK_MULTI_CONFIG_POSTFIX_&lt;CONFIG&gt;"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">FRAMEWORK_MULTI_CONFIG_POSTFIX_&lt;CONFIG&gt;</span></code></a> target property
and associated <span class="target" id="index-0-variable:CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_&lt;CONFIG&gt;"></span><a class="reference internal" href="../variable/CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG.html#variable:CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_&lt;CONFIG&gt;" title="CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_&lt;CONFIG&gt;"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_&lt;CONFIG&gt;</span></code></a>
variable were created to allow adding a postfix to the name of a
framework file name when using a multi-config generator.</p></li>
<li><p>The <span class="target" id="index-0-prop_sf:OBJECT_OUTPUTS"></span><a class="reference internal" href="../prop_sf/OBJECT_OUTPUTS.html#prop_sf:OBJECT_OUTPUTS" title="OBJECT_OUTPUTS"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">OBJECT_OUTPUTS</span></code></a> source file property now supports
<span class="target" id="index-0-manual:cmake-generator-expressions(7)"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#manual:cmake-generator-expressions(7)" title="cmake-generator-expressions(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">generator</span> <span class="pre">expressions</span></code></a>.</p></li>
<li><p>The <span class="target" id="index-1-prop_tgt:PCH_WARN_INVALID"></span><a class="reference internal" href="../prop_tgt/PCH_WARN_INVALID.html#prop_tgt:PCH_WARN_INVALID" title="PCH_WARN_INVALID"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">PCH_WARN_INVALID</span></code></a> target property was added to allow the
removal of the precompiled header invalid warning.</p></li>
<li><p>The <span class="target" id="index-0-prop_tgt:UNITY_BUILD_MODE"></span><a class="reference internal" href="../prop_tgt/UNITY_BUILD_MODE.html#prop_tgt:UNITY_BUILD_MODE" title="UNITY_BUILD_MODE"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">UNITY_BUILD_MODE</span></code></a> target property was added to tell
generators which algorithm to use for grouping included source
files.</p></li>
<li><p>The <span class="target" id="index-0-prop_tgt:VS_SOURCE_SETTINGS_&lt;tool&gt;"></span><a class="reference internal" href="../prop_tgt/VS_SOURCE_SETTINGS_tool.html#prop_tgt:VS_SOURCE_SETTINGS_&lt;tool&gt;" title="VS_SOURCE_SETTINGS_&lt;tool&gt;"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">VS_SOURCE_SETTINGS_&lt;tool&gt;</span></code></a> target property was added
to tell <a class="reference internal" href="../manual/cmake-generators.7.html#visual-studio-generators"><span class="std std-ref">Visual Studio Generators</span></a> for VS 2010 and above to add
metadata to non-built source files using <code class="docutils literal notranslate"><span class="pre">&lt;tool&gt;</span></code>.</p></li>
<li><p>The <span class="target" id="index-0-prop_sf:VS_SETTINGS"></span><a class="reference internal" href="../prop_sf/VS_SETTINGS.html#prop_sf:VS_SETTINGS" title="VS_SETTINGS"><code class="xref cmake cmake-prop_sf docutils literal notranslate"><span class="pre">VS_SETTINGS</span></code></a> source file property was added to tell
<a class="reference internal" href="../manual/cmake-generators.7.html#visual-studio-generators"><span class="std std-ref">Visual Studio Generators</span></a> for VS 2010 and above to add
metadata to a non-built source file.</p></li>
<li><p>The <span class="target" id="index-0-prop_tgt:VS_PLATFORM_TOOLSET"></span><a class="reference internal" href="../prop_tgt/VS_PLATFORM_TOOLSET.html#prop_tgt:VS_PLATFORM_TOOLSET" title="VS_PLATFORM_TOOLSET"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">VS_PLATFORM_TOOLSET</span></code></a> target property was added to tell
<a class="reference internal" href="../manual/cmake-generators.7.html#visual-studio-generators"><span class="std std-ref">Visual Studio Generators</span></a> for VS 2010 and above to override
the platform toolset.</p></li>
<li><p>The <span class="target" id="index-0-prop_tgt:VS_SOLUTION_DEPLOY"></span><a class="reference internal" href="../prop_tgt/VS_SOLUTION_DEPLOY.html#prop_tgt:VS_SOLUTION_DEPLOY" title="VS_SOLUTION_DEPLOY"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">VS_SOLUTION_DEPLOY</span></code></a> target property was added to tell
<a class="reference internal" href="../manual/cmake-generators.7.html#visual-studio-generators"><span class="std std-ref">Visual Studio Generators</span></a> for VS 2010 and above to mark a
target for deployment even when not building for Windows Phone/Store/CE.</p></li>
</ul>
</section>
<section id="modules">
<h3><a class="toc-backref" href="#id11" role="doc-backlink">Modules</a><a class="headerlink" href="#modules" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p>The <span class="target" id="index-0-module:CheckLinkerFlag"></span><a class="reference internal" href="../module/CheckLinkerFlag.html#module:CheckLinkerFlag" title="CheckLinkerFlag"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">CheckLinkerFlag</span></code></a> module has been added to provide a
facility to check validity of link flags.</p></li>
<li><p>The <span class="target" id="index-0-module:ExternalProject"></span><a class="reference internal" href="../module/ExternalProject.html#module:ExternalProject" title="ExternalProject"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">ExternalProject</span></code></a> module <span class="target" id="index-0-command:externalproject_add"></span><a class="reference internal" href="../module/ExternalProject.html#command:externalproject_add" title="externalproject_add"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">ExternalProject_Add()</span></code></a> command
gained a new <code class="docutils literal notranslate"><span class="pre">GIT_REMOTE_UPDATE_STRATEGY</span></code> keyword.  This can be used to
specify how failed rebase operations during a git update should be handled.
The <code class="docutils literal notranslate"><span class="pre">CMAKE_EP_GIT_REMOTE_UPDATE_STRATEGY</span></code> variable was also added as a
global default and is honored by both the <span class="target" id="index-1-module:ExternalProject"></span><a class="reference internal" href="../module/ExternalProject.html#module:ExternalProject" title="ExternalProject"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">ExternalProject</span></code></a> and
<span class="target" id="index-0-module:FetchContent"></span><a class="reference internal" href="../module/FetchContent.html#module:FetchContent" title="FetchContent"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FetchContent</span></code></a> modules.</p></li>
<li><p>The <span class="target" id="index-1-module:FetchContent"></span><a class="reference internal" href="../module/FetchContent.html#module:FetchContent" title="FetchContent"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FetchContent</span></code></a> module <span class="target" id="index-0-command:fetchcontent_declare"></span><a class="reference internal" href="../module/FetchContent.html#command:fetchcontent_declare" title="fetchcontent_declare"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">FetchContent_Declare()</span></code></a> command
now supports a <code class="docutils literal notranslate"><span class="pre">SOURCE_SUBDIR</span></code> option.  It can be used to direct
<span class="target" id="index-0-command:fetchcontent_makeavailable"></span><a class="reference internal" href="../module/FetchContent.html#command:fetchcontent_makeavailable" title="fetchcontent_makeavailable"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">FetchContent_MakeAvailable()</span></code></a> to look in a different location
for the <code class="docutils literal notranslate"><span class="pre">CMakeLists.txt</span></code> file.</p></li>
<li><p>The <span class="target" id="index-0-module:FindBLAS"></span><a class="reference internal" href="../module/FindBLAS.html#module:FindBLAS" title="FindBLAS"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FindBLAS</span></code></a> module now provides an imported target.</p></li>
<li><p>The <span class="target" id="index-0-module:FindCUDAToolkit"></span><a class="reference internal" href="../module/FindCUDAToolkit.html#module:FindCUDAToolkit" title="FindCUDAToolkit"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FindCUDAToolkit</span></code></a> module:</p>
<ul>
<li><p>gained the variable
<code class="docutils literal notranslate"><span class="pre">CUDAToolkit_LIBRARY_ROOT</span></code>, which is the directory containing the
<code class="docutils literal notranslate"><span class="pre">nvvm</span></code> directory and <code class="docutils literal notranslate"><span class="pre">version.txt</span></code>.</p></li>
<li><p>uses toolkit and library root found during <code class="docutils literal notranslate"><span class="pre">CUDA</span></code> compiler detection.</p></li>
</ul>
</li>
<li><p>The <span class="target" id="index-0-module:FindLAPACK"></span><a class="reference internal" href="../module/FindLAPACK.html#module:FindLAPACK" title="FindLAPACK"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FindLAPACK</span></code></a> module now provides an imported target.</p></li>
<li><p>The <span class="target" id="index-0-module:FindPython3"></span><a class="reference internal" href="../module/FindPython3.html#module:FindPython3" title="FindPython3"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FindPython3</span></code></a>, <span class="target" id="index-0-module:FindPython2"></span><a class="reference internal" href="../module/FindPython2.html#module:FindPython2" title="FindPython2"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FindPython2</span></code></a> and <span class="target" id="index-0-module:FindPython"></span><a class="reference internal" href="../module/FindPython.html#module:FindPython" title="FindPython"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FindPython</span></code></a>
modules:</p>
<ul>
<li><p>gained the possibility to create per-artifact cache variables for
interactive editing in <span class="target" id="index-0-manual:cmake-gui(1)"></span><a class="reference internal" href="../manual/cmake-gui.1.html#manual:cmake-gui(1)" title="cmake-gui(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-gui(1)</span></code></a> and <span class="target" id="index-0-manual:ccmake(1)"></span><a class="reference internal" href="../manual/ccmake.1.html#manual:ccmake(1)" title="ccmake(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">ccmake(1)</span></code></a>.</p></li>
<li><p>gained sub-components <code class="docutils literal notranslate"><span class="pre">Development.Module</span></code> and
<code class="docutils literal notranslate"><span class="pre">Development.Embed</span></code> under the <code class="docutils literal notranslate"><span class="pre">Development</span></code> component.</p></li>
<li><p>gained the capability to specify which Python implementations to find,
including <code class="docutils literal notranslate"><span class="pre">IronPython</span></code> and <code class="docutils literal notranslate"><span class="pre">PyPy</span></code>.</p></li>
</ul>
</li>
<li><p>The <span class="target" id="index-0-module:FindRuby"></span><a class="reference internal" href="../module/FindRuby.html#module:FindRuby" title="FindRuby"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FindRuby</span></code></a> module input and output variables were all renamed
from <code class="docutils literal notranslate"><span class="pre">RUBY_</span></code> to <code class="docutils literal notranslate"><span class="pre">Ruby_</span></code> for consistency with other find modules.
Input variables of the old case will be honored if provided, and output
variables of the old case are always provided.</p></li>
<li><p>The <span class="target" id="index-0-module:FindSWIG"></span><a class="reference internal" href="../module/FindSWIG.html#module:FindSWIG" title="FindSWIG"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FindSWIG</span></code></a> module now accepts target languages as  <code class="docutils literal notranslate"><span class="pre">COMPONENTS</span></code>
and <code class="docutils literal notranslate"><span class="pre">OPTIONAL_COMPONENTS</span></code> arguments to <code class="docutils literal notranslate"><span class="pre">find_package</span></code>.</p></li>
<li><p>The <span class="target" id="index-0-module:GoogleTest"></span><a class="reference internal" href="../module/GoogleTest.html#module:GoogleTest" title="GoogleTest"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">GoogleTest</span></code></a> module <span class="target" id="index-0-command:gtest_discover_tests"></span><a class="reference internal" href="../module/GoogleTest.html#command:gtest_discover_tests" title="gtest_discover_tests"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">gtest_discover_tests()</span></code></a> command:</p>
<ul>
<li><p>gained a new <code class="docutils literal notranslate"><span class="pre">DISCOVERY_MODE</span></code> option to control when the test
discovery step is run.  It offers a new <code class="docutils literal notranslate"><span class="pre">PRE_TEST</span></code> setting to
run the discovery at test time instead of build time.  A new
<code class="docutils literal notranslate"><span class="pre">CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE</span></code> variable can be used
to change the default globally.</p></li>
<li><p>gained a new optional parameter <code class="docutils literal notranslate"><span class="pre">XML_OUTPUT_DIR</span></code>. When set the
JUnit XML test results are stored in that directory.</p></li>
</ul>
</li>
<li><p>The <span class="target" id="index-0-module:FindLibXslt"></span><a class="reference internal" href="../module/FindLibXslt.html#module:FindLibXslt" title="FindLibXslt"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FindLibXslt</span></code></a> module now provides imported targets.</p></li>
<li><p>The <span class="target" id="index-0-module:UseSWIG"></span><a class="reference internal" href="../module/UseSWIG.html#module:UseSWIG" title="UseSWIG"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">UseSWIG</span></code></a> module now supports Fortran as a target language if
the <code class="docutils literal notranslate"><span class="pre">SWIG_EXECUTABLE</span></code> is <a class="reference external" href="https://github.com/swig-fortran/swig">SWIG-Fortran</a>.</p></li>
</ul>
</section>
<section id="generator-expressions">
<h3><a class="toc-backref" href="#id12" role="doc-backlink">Generator Expressions</a><a class="headerlink" href="#generator-expressions" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p>The <span class="target" id="index-0-genex:DEVICE_LINK"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:DEVICE_LINK" title="DEVICE_LINK"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">$&lt;DEVICE_LINK:...&gt;</span></code></a> and <span class="target" id="index-0-genex:HOST_LINK"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:HOST_LINK" title="HOST_LINK"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">$&lt;HOST_LINK:...&gt;</span></code></a>
generator expressions were added to manage device and host link steps.</p></li>
<li><p>The <span class="target" id="index-0-genex:LINK_LANGUAGE"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:LINK_LANGUAGE" title="LINK_LANGUAGE"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">$&lt;LINK_LANGUAGE:...&gt;</span></code></a> and <span class="target" id="index-0-genex:LINK_LANG_AND_ID"></span><a class="reference internal" href="../manual/cmake-generator-expressions.7.html#genex:LINK_LANG_AND_ID" title="LINK_LANG_AND_ID"><code class="xref cmake cmake-genex docutils literal notranslate"><span class="pre">$&lt;LINK_LANG_AND_ID:...&gt;</span></code></a>
generator expressions were added.</p></li>
</ul>
</section>
<section id="ctest">
<h3><a class="toc-backref" href="#id13" role="doc-backlink">CTest</a><a class="headerlink" href="#ctest" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="target" id="index-0-manual:ctest(1)"></span><a class="reference internal" href="../manual/ctest.1.html#manual:ctest(1)" title="ctest(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">ctest(1)</span></code></a> gained a new <span class="target" id="index-0-variable:CTEST_RESOURCE_SPEC_FILE"></span><a class="reference internal" href="../variable/CTEST_RESOURCE_SPEC_FILE.html#variable:CTEST_RESOURCE_SPEC_FILE" title="CTEST_RESOURCE_SPEC_FILE"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CTEST_RESOURCE_SPEC_FILE</span></code></a>
variable, which can be used to specify a
<a class="reference internal" href="../manual/ctest.1.html#ctest-resource-specification-file"><span class="std std-ref">resource specification file</span></a>.</p></li>
<li><p><span class="target" id="index-1-manual:ctest(1)"></span><a class="reference internal" href="../manual/ctest.1.html#manual:ctest(1)" title="ctest(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">ctest(1)</span></code></a> gained a <code class="docutils literal notranslate"><span class="pre">--stop-on-failure</span></code> option,
which can be used to stop running the tests once one has failed.</p></li>
<li><p>The <span class="target" id="index-0-command:ctest_test"></span><a class="reference internal" href="../command/ctest_test.html#command:ctest_test" title="ctest_test"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">ctest_test()</span></code></a> command gained a <code class="docutils literal notranslate"><span class="pre">STOP_ON_FAILURE</span></code> option
which can be used to stop running the tests once one has failed.</p></li>
<li><p>The <span class="target" id="index-0-module:CTestCoverageCollectGCOV"></span><a class="reference internal" href="../module/CTestCoverageCollectGCOV.html#module:CTestCoverageCollectGCOV" title="CTestCoverageCollectGCOV"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">CTestCoverageCollectGCOV</span></code></a> module
<span class="target" id="index-0-command:ctest_coverage_collect_gcov"></span><a class="reference internal" href="../module/CTestCoverageCollectGCOV.html#command:ctest_coverage_collect_gcov" title="ctest_coverage_collect_gcov"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">ctest_coverage_collect_gcov()</span></code></a> command gained a
<code class="docutils literal notranslate"><span class="pre">TARBALL_COMPRESSION</span></code> option to control compression of the
tarball of collected results.</p></li>
</ul>
</section>
<section id="cpack">
<h3><a class="toc-backref" href="#id14" role="doc-backlink">CPack</a><a class="headerlink" href="#cpack" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p>The <span class="target" id="index-0-cpack_gen:CPack Archive Generator"></span><a class="reference internal" href="../cpack_gen/archive.html#cpack_gen:CPack Archive Generator" title="CPack Archive Generator"><code class="xref cmake cmake-cpack_gen docutils literal notranslate"><span class="pre">CPack</span> <span class="pre">Archive</span> <span class="pre">Generator</span></code></a>'s <code class="docutils literal notranslate"><span class="pre">TXZ</span></code> format learned the
<span class="target" id="index-0-variable:CPACK_ARCHIVE_THREADS"></span><a class="reference internal" href="../cpack_gen/archive.html#variable:CPACK_ARCHIVE_THREADS" title="CPACK_ARCHIVE_THREADS"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CPACK_ARCHIVE_THREADS</span></code></a> variable to enable parallel compression.
Requires support in the <code class="docutils literal notranslate"><span class="pre">liblzma</span></code> used by CMake.</p></li>
<li><p>The <span class="target" id="index-0-cpack_gen:CPack NSIS Generator"></span><a class="reference internal" href="../cpack_gen/nsis.html#cpack_gen:CPack NSIS Generator" title="CPack NSIS Generator"><code class="xref cmake cmake-cpack_gen docutils literal notranslate"><span class="pre">CPack</span> <span class="pre">NSIS</span> <span class="pre">Generator</span></code></a> gained a new variable
<span class="target" id="index-0-variable:CPACK_NSIS_MANIFEST_DPI_AWARE"></span><a class="reference internal" href="../cpack_gen/nsis.html#variable:CPACK_NSIS_MANIFEST_DPI_AWARE" title="CPACK_NSIS_MANIFEST_DPI_AWARE"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CPACK_NSIS_MANIFEST_DPI_AWARE</span></code></a> to declare that the
installer is DPI-aware.</p></li>
<li><p>The <span class="target" id="index-0-cpack_gen:CPack RPM Generator"></span><a class="reference internal" href="../cpack_gen/rpm.html#cpack_gen:CPack RPM Generator" title="CPack RPM Generator"><code class="xref cmake cmake-cpack_gen docutils literal notranslate"><span class="pre">CPack</span> <span class="pre">RPM</span> <span class="pre">Generator</span></code></a> gained
<span class="target" id="index-0-variable:CPACK_RPM_PRE_TRANS_SCRIPT_FILE"></span><a class="reference internal" href="../cpack_gen/rpm.html#variable:CPACK_RPM_PRE_TRANS_SCRIPT_FILE" title="CPACK_RPM_PRE_TRANS_SCRIPT_FILE"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CPACK_RPM_PRE_TRANS_SCRIPT_FILE</span></code></a> and
<span class="target" id="index-0-variable:CPACK_RPM_POST_TRANS_SCRIPT_FILE"></span><a class="reference internal" href="../cpack_gen/rpm.html#variable:CPACK_RPM_POST_TRANS_SCRIPT_FILE" title="CPACK_RPM_POST_TRANS_SCRIPT_FILE"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CPACK_RPM_POST_TRANS_SCRIPT_FILE</span></code></a>
variables to specify pre- and post-transaction scripts.</p></li>
</ul>
</section>
<section id="other">
<h3><a class="toc-backref" href="#id15" role="doc-backlink">Other</a><a class="headerlink" href="#other" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p><span class="target" id="index-1-manual:cmake-gui(1)"></span><a class="reference internal" href="../manual/cmake-gui.1.html#manual:cmake-gui(1)" title="cmake-gui(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-gui(1)</span></code></a> now populates its generator selection
widget default value from the <span class="target" id="index-0-envvar:CMAKE_GENERATOR"></span><a class="reference internal" href="../envvar/CMAKE_GENERATOR.html#envvar:CMAKE_GENERATOR" title="CMAKE_GENERATOR"><code class="xref cmake cmake-envvar docutils literal notranslate"><span class="pre">CMAKE_GENERATOR</span></code></a> environment
variable.  Additionally, environment variables
<span class="target" id="index-0-envvar:CMAKE_GENERATOR_PLATFORM"></span><a class="reference internal" href="../envvar/CMAKE_GENERATOR_PLATFORM.html#envvar:CMAKE_GENERATOR_PLATFORM" title="CMAKE_GENERATOR_PLATFORM"><code class="xref cmake cmake-envvar docutils literal notranslate"><span class="pre">CMAKE_GENERATOR_PLATFORM</span></code></a> and <span class="target" id="index-0-envvar:CMAKE_GENERATOR_TOOLSET"></span><a class="reference internal" href="../envvar/CMAKE_GENERATOR_TOOLSET.html#envvar:CMAKE_GENERATOR_TOOLSET" title="CMAKE_GENERATOR_TOOLSET"><code class="xref cmake cmake-envvar docutils literal notranslate"><span class="pre">CMAKE_GENERATOR_TOOLSET</span></code></a>
are used to populate their respective widget defaults.</p></li>
<li><p><span class="target" id="index-1-manual:ccmake(1)"></span><a class="reference internal" href="../manual/ccmake.1.html#manual:ccmake(1)" title="ccmake(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">ccmake(1)</span></code></a> learned to read a <span class="target" id="index-0-envvar:CCMAKE_COLORS"></span><a class="reference internal" href="../envvar/CCMAKE_COLORS.html#envvar:CCMAKE_COLORS" title="CCMAKE_COLORS"><code class="xref cmake cmake-envvar docutils literal notranslate"><span class="pre">CCMAKE_COLORS</span></code></a>
environment variable to customize colors.</p></li>
<li><p>The <span class="target" id="index-0-manual:cmake-compile-features(7)"></span><a class="reference internal" href="../manual/cmake-compile-features.7.html#manual:cmake-compile-features(7)" title="cmake-compile-features(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">Compile</span> <span class="pre">Features</span></code></a> functionality
is now aware of the availability of C11 features in MSVC 19.27 and 19.28,
including support for the <code class="docutils literal notranslate"><span class="pre">c_restrict</span></code>, <code class="docutils literal notranslate"><span class="pre">c_static_assert</span></code> features and
the <code class="docutils literal notranslate"><span class="pre">-std:c11</span></code> flag.</p></li>
</ul>
</section>
</section>
<section id="deprecated-and-removed-features">
<h2><a class="toc-backref" href="#id16" role="doc-backlink">Deprecated and Removed Features</a><a class="headerlink" href="#deprecated-and-removed-features" title="Link to this heading">¶</a></h2>
<ul class="simple">
<li><p>The <span class="target" id="index-0-module:Documentation"></span><a class="reference internal" href="../module/Documentation.html#module:Documentation" title="Documentation"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">Documentation</span></code></a> module has been deprecated via
<span class="target" id="index-0-policy:CMP0106"></span><a class="reference internal" href="../policy/CMP0106.html#policy:CMP0106" title="CMP0106"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0106</span></code></a>. This module was essentially VTK code that CMake should
not be shipping anymore.</p></li>
<li><p>An explicit deprecation diagnostic was added for policy <code class="docutils literal notranslate"><span class="pre">CMP0070</span></code>
and policy <code class="docutils literal notranslate"><span class="pre">CMP0071</span></code> (<code class="docutils literal notranslate"><span class="pre">CMP0069</span></code> and below were already deprecated).
The <span class="target" id="index-0-manual:cmake-policies(7)"></span><a class="reference internal" href="../manual/cmake-policies.7.html#manual:cmake-policies(7)" title="cmake-policies(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-policies(7)</span></code></a> manual explains that the OLD behaviors
of all policies are deprecated and that projects should port to the
NEW behaviors.</p></li>
</ul>
</section>
<section id="other-changes">
<h2><a class="toc-backref" href="#id17" role="doc-backlink">Other Changes</a><a class="headerlink" href="#other-changes" title="Link to this heading">¶</a></h2>
<ul class="simple">
<li><p>On Windows, the <span class="target" id="index-0-generator:Ninja"></span><a class="reference internal" href="../generator/Ninja.html#generator:Ninja" title="Ninja"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span></code></a> and <span class="target" id="index-0-generator:Ninja Multi-Config"></span><a class="reference internal" href="../generator/Ninja%20Multi-Config.html#generator:Ninja Multi-Config" title="Ninja Multi-Config"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Ninja</span> <span class="pre">Multi-Config</span></code></a>
generators, when a compiler is not explicitly specified, now select
the first compiler (of any name) found in directories listed by the
<code class="docutils literal notranslate"><span class="pre">PATH</span></code> environment variable.</p></li>
<li><p>The <span class="target" id="index-0-prop_tgt:LINK_OPTIONS"></span><a class="reference internal" href="../prop_tgt/LINK_OPTIONS.html#prop_tgt:LINK_OPTIONS" title="LINK_OPTIONS"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">LINK_OPTIONS</span></code></a> and <span class="target" id="index-0-prop_tgt:INTERFACE_LINK_OPTIONS"></span><a class="reference internal" href="../prop_tgt/INTERFACE_LINK_OPTIONS.html#prop_tgt:INTERFACE_LINK_OPTIONS" title="INTERFACE_LINK_OPTIONS"><code class="xref cmake cmake-prop_tgt docutils literal notranslate"><span class="pre">INTERFACE_LINK_OPTIONS</span></code></a> target
properties are now used for the device link step.
See policy <span class="target" id="index-0-policy:CMP0105"></span><a class="reference internal" href="../policy/CMP0105.html#policy:CMP0105" title="CMP0105"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0105</span></code></a>.</p></li>
<li><p>Creation of an <code class="docutils literal notranslate"><span class="pre">ALIAS</span></code> target overwriting an existing target now raises an
error. See policy <span class="target" id="index-0-policy:CMP0107"></span><a class="reference internal" href="../policy/CMP0107.html#policy:CMP0107" title="CMP0107"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0107</span></code></a>.</p></li>
<li><p>Linking a target to itself through an alias now raises an error.
See policy <span class="target" id="index-0-policy:CMP0108"></span><a class="reference internal" href="../policy/CMP0108.html#policy:CMP0108" title="CMP0108"><code class="xref cmake cmake-policy docutils literal notranslate"><span class="pre">CMP0108</span></code></a>.</p></li>
<li><p>The <span class="target" id="index-0-module:FindPackageHandleStandardArgs"></span><a class="reference internal" href="../module/FindPackageHandleStandardArgs.html#module:FindPackageHandleStandardArgs" title="FindPackageHandleStandardArgs"><code class="xref cmake cmake-module docutils literal notranslate"><span class="pre">FindPackageHandleStandardArgs</span></code></a> module option <code class="docutils literal notranslate"><span class="pre">REQUIRED_VARS</span></code>
is now optional if <code class="docutils literal notranslate"><span class="pre">HANDLE_COMPONENTS</span></code> is specified.</p></li>
<li><p>The <span class="target" id="index-0-command:source_group"></span><a class="reference internal" href="../command/source_group.html#command:source_group" title="source_group"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">source_group()</span></code></a> command now also recognizes forward slashes
as subgroup delimiters, not just backslashes.</p></li>
<li><p><span class="target" id="index-2-manual:ctest(1)"></span><a class="reference internal" href="../manual/ctest.1.html#manual:ctest(1)" title="ctest(1)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">ctest(1)</span></code></a> now logs environment variables that it sets for each test,
either due to the <span class="target" id="index-0-prop_test:ENVIRONMENT"></span><a class="reference internal" href="../prop_test/ENVIRONMENT.html#prop_test:ENVIRONMENT" title="ENVIRONMENT"><code class="xref cmake cmake-prop_test docutils literal notranslate"><span class="pre">ENVIRONMENT</span></code></a> property or the
<a class="reference internal" href="../manual/ctest.1.html#ctest-resource-allocation"><span class="std std-ref">resource allocation</span></a> feature, and submits
this log to CDash. It does not log environment variables that were set
outside of CTest.</p></li>
<li><p>When building CMake itself from source and not using a system-provided
libcurl, HTTP/2 support is now enabled for commands supporting
network communication via <code class="docutils literal notranslate"><span class="pre">http(s)</span></code>, such as <span class="target" id="index-3-command:file"></span><a class="reference internal" href="../command/file.html#download" title="file(download)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">file(DOWNLOAD)</span></code></a>,
<span class="target" id="index-4-command:file"></span><a class="reference internal" href="../command/file.html#upload" title="file(upload)"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">file(UPLOAD)</span></code></a>, and <span class="target" id="index-0-command:ctest_submit"></span><a class="reference internal" href="../command/ctest_submit.html#command:ctest_submit" title="ctest_submit"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">ctest_submit()</span></code></a>.
The precompiled binaries provided on <code class="docutils literal notranslate"><span class="pre">cmake.org</span></code> now support HTTP/2.</p></li>
<li><p>The <span class="target" id="index-0-manual:cmake-file-api(7)"></span><a class="reference internal" href="../manual/cmake-file-api.7.html#manual:cmake-file-api(7)" title="cmake-file-api(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-file-api(7)</span></code></a> &quot;codemodel&quot; version 2 <code class="docutils literal notranslate"><span class="pre">version</span></code> field has
been updated to 2.1.</p></li>
<li><p>The <span class="target" id="index-1-manual:cmake-file-api(7)"></span><a class="reference internal" href="../manual/cmake-file-api.7.html#manual:cmake-file-api(7)" title="cmake-file-api(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">cmake-file-api(7)</span></code></a> &quot;codemodel&quot; version 2 &quot;target&quot; object gained
a new <code class="docutils literal notranslate"><span class="pre">precompileHeaders</span></code> field in the <code class="docutils literal notranslate"><span class="pre">compileGroups</span></code> objects.</p></li>
</ul>
</section>
<section id="updates">
<h2><a class="toc-backref" href="#id18" role="doc-backlink">Updates</a><a class="headerlink" href="#updates" title="Link to this heading">¶</a></h2>
<p>Changes made since CMake 3.18.0 include the following.</p>
<section id="id1">
<h3><a class="toc-backref" href="#id19" role="doc-backlink">3.18.1</a><a class="headerlink" href="#id1" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p>The <span class="target" id="index-0-generator:Xcode"></span><a class="reference internal" href="../generator/Xcode.html#generator:Xcode" title="Xcode"><code class="xref cmake cmake-generator docutils literal notranslate"><span class="pre">Xcode</span></code></a> generator, when <span class="target" id="index-0-variable:CMAKE_OSX_ARCHITECTURES"></span><a class="reference internal" href="../variable/CMAKE_OSX_ARCHITECTURES.html#variable:CMAKE_OSX_ARCHITECTURES" title="CMAKE_OSX_ARCHITECTURES"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_OSX_ARCHITECTURES</span></code></a>
is not defined, now selects <code class="docutils literal notranslate"><span class="pre">$(NATIVE_ARCH_ACTUAL)</span></code> as the default
architecture (the Xcode <code class="docutils literal notranslate"><span class="pre">ARCHS</span></code> setting).  This is needed for Xcode 12
to select the host's architecture, which older versions of Xcode did
by default.</p></li>
<li><p>In CMake 3.18.0 the <span class="target" id="index-0-command:add_test"></span><a class="reference internal" href="../command/add_test.html#command:add_test" title="add_test"><code class="xref cmake cmake-command docutils literal notranslate"><span class="pre">add_test()</span></code></a> command learned to support
special characters in test names.  This was accidentally left out of
its release notes.  Unfortunately the fix breaks existing projects
that were using manual quoting or escaping to work around the prior
limitation.  This fix has been reverted in 3.18.1, but may be
re-introduced in future versions of CMake with a policy for compatibility.</p></li>
</ul>
</section>
<section id="id2">
<h3><a class="toc-backref" href="#id20" role="doc-backlink">3.18.2</a><a class="headerlink" href="#id2" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p>The default value of <span class="target" id="index-0-variable:CMAKE_AUTOMOC_PATH_PREFIX"></span><a class="reference internal" href="../variable/CMAKE_AUTOMOC_PATH_PREFIX.html#variable:CMAKE_AUTOMOC_PATH_PREFIX" title="CMAKE_AUTOMOC_PATH_PREFIX"><code class="xref cmake cmake-variable docutils literal notranslate"><span class="pre">CMAKE_AUTOMOC_PATH_PREFIX</span></code></a> was changed to
<code class="docutils literal notranslate"><span class="pre">OFF</span></code> because this feature can break existing projects that have
identically named header files in different include directories.
This restores compatibility with behavior of CMake 3.15 and below.
The default was also changed to <code class="docutils literal notranslate"><span class="pre">OFF</span></code> in 3.16.9 and 3.17.5.</p></li>
<li><p>The <span class="target" id="index-1-manual:cmake-compile-features(7)"></span><a class="reference internal" href="../manual/cmake-compile-features.7.html#manual:cmake-compile-features(7)" title="cmake-compile-features(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">Compile</span> <span class="pre">Features</span></code></a> functionality
was updated for MSVC 19.27 as mentioned above (<code class="docutils literal notranslate"><span class="pre">c_restrict</span></code>).</p></li>
</ul>
</section>
<section id="id3">
<h3><a class="toc-backref" href="#id21" role="doc-backlink">3.18.3</a><a class="headerlink" href="#id3" title="Link to this heading">¶</a></h3>
<ul class="simple">
<li><p>The <span class="target" id="index-2-manual:cmake-compile-features(7)"></span><a class="reference internal" href="../manual/cmake-compile-features.7.html#manual:cmake-compile-features(7)" title="cmake-compile-features(7)"><code class="xref cmake cmake-manual docutils literal notranslate"><span class="pre">Compile</span> <span class="pre">Features</span></code></a> functionality
was updated for MSVC 19.28 as mentioned above (<code class="docutils literal notranslate"><span class="pre">c_static_assert</span></code>).</p></li>
</ul>
</section>
</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
  <div>
    <h3>Table of Contents</h3>
    <ul>
<li><a class="reference internal" href="#">CMake 3.18 Release Notes</a><ul>
<li><a class="reference internal" href="#new-features">New Features</a><ul>
<li><a class="reference internal" href="#languages">Languages</a></li>
<li><a class="reference internal" href="#command-line">Command-Line</a></li>
<li><a class="reference internal" href="#commands">Commands</a></li>
<li><a class="reference internal" href="#variables">Variables</a></li>
<li><a class="reference internal" href="#properties">Properties</a></li>
<li><a class="reference internal" href="#modules">Modules</a></li>
<li><a class="reference internal" href="#generator-expressions">Generator Expressions</a></li>
<li><a class="reference internal" href="#ctest">CTest</a></li>
<li><a class="reference internal" href="#cpack">CPack</a></li>
<li><a class="reference internal" href="#other">Other</a></li>
</ul>
</li>
<li><a class="reference internal" href="#deprecated-and-removed-features">Deprecated and Removed Features</a></li>
<li><a class="reference internal" href="#other-changes">Other Changes</a></li>
<li><a class="reference internal" href="#updates">Updates</a><ul>
<li><a class="reference internal" href="#id1">3.18.1</a></li>
<li><a class="reference internal" href="#id2">3.18.2</a></li>
<li><a class="reference internal" href="#id3">3.18.3</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  </div>
  <div>
    <h4>Previous topic</h4>
    <p class="topless"><a href="3.19.html"
                          title="previous chapter">CMake 3.19 Release Notes</a></p>
  </div>
  <div>
    <h4>Next topic</h4>
    <p class="topless"><a href="3.17.html"
                          title="next chapter">CMake 3.17 Release Notes</a></p>
  </div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/release/3.18.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="3.17.html" title="CMake 3.17 Release Notes"
             >next</a> |</li>
        <li class="right" >
          <a href="3.19.html" title="CMake 3.19 Release Notes"
             >previous</a> |</li>
  <li>
    <label class="sidebar-toggle" for="sidebar-check"></label>
  </li>
  <li class="rootlink">
    <img src="../_static/cmake-logo-16.png" width="16" height="16" alt=""/>
    <a href="https://cmake.org/">CMake 4.1.1</a>
    <span class="reldelim1"> &#187;</span>
  </li>
  <li>
    <a href="../index.html">Documentation</a> &#187;
  </li>

          <li class="nav-item nav-item-1"><a href="index.html" >CMake Release Notes</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="">CMake 3.18 Release Notes</a></li> 
      </ul>
    </div>

    <div class="footer" role="contentinfo">
    &#169; Copyright 2000-2025 Kitware, Inc. and Contributors.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.1.3.
    </div>
<script type="text/javascript">
(function() {
  "use strict";
  const hide = () => document.getElementById("sidebar-check").checked = false;
  addEventListener("keydown", e => (e.key === "Escape") && hide());
  addEventListener("click", e => (e.target.tagName === "A") && hide());
  addEventListener("hashchange", hide)
})();
</script>
  </body>
</html>